package com.pearadmin.pro.modules.stu.service.impl;

import java.util.List;
import java.util.ArrayList;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pearadmin.pro.common.web.base.page.PageResponse;
import com.pearadmin.pro.common.web.base.page.Pageable;

import com.pearadmin.pro.modules.stu.domain.StuRoll;
import com.pearadmin.pro.modules.stu.param.StuRollRequest;
import com.pearadmin.pro.modules.stu.repository.StuRollRepository;
import com.pearadmin.pro.modules.stu.service.StuRollService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;


/**
 * 学籍信息Service业务层处理
 *
 * @author chenJian
 * @date 2021-09-09
 */
@Service
public class StuRollServiceImpl extends ServiceImpl<StuRollRepository, StuRoll> implements StuRollService
{
    @Resource
    private StuRollRepository stuRollRepository;

    /**
     * 查询学籍信息
     * @param request
     * @return 学籍信息 分页集合
     * */
    @Override
    public PageResponse<StuRoll> page(StuRollRequest request)
    {
        LambdaQueryWrapper<StuRoll> query = new LambdaQueryWrapper<StuRoll>();
        return Pageable.of(request,(()->  stuRollRepository.selectList(query)));
    }

    /**
     * 查询学籍信息
     *
     * @param id 学籍信息ID
     * @return 学籍信息
     */
    @Override
    public StuRoll selectStuRollById(Long id)
    {
        return stuRollRepository.selectById(id);
    }

}
